﻿
//获取URL参数
function getUrlParas(paras) {
    var url = location.href;
    var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&");
    var paraObj = {}
    for (i = 0; j = paraString[i]; i++) {
        paraObj[j.substring(0, j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=") + 1, j.length);
    }
    var returnValue = paraObj[paras.toLowerCase()];
    if (typeof (returnValue) == "undefined") {
        return "";
    } else {
        return returnValue;
    }
}


function frameInit() {
    var src = "";
    switch (getUrlParas("Act")) {
        case "WeiboSet":
            src = "uc_Myweibo.aspx";
        case "NewsSet":
            src = "uc_MyNews.aspx";
        default:
            src = "uc_AccountSetting.aspx";
    }
    document.getElementById("main_frame").src = src;
    alert(request("Act"));
}

window.onload = frameInit;